<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div id="div">我是被操作的对象</div>
    <input type="button" id="btn1" value="获取div的文本对象">
    <input type="button" id="btn2" value="设置div的文本对象">
</body>
<script src="JS/jquery-3.3.1.min.js"></script>
<script>
    //获取文本内容
    $("#btn1").click(function(){
       let value= $("#div").html();
        alert(value);
    });
    //设置文本内容，一个重载
    $("#btn2").click(function(){
        let value=$("#div").html("设置文本对象");
    })
</script>
</html>